/*
 * @Author: zhaoyani
 * @Date: 2018-06-14 16:43:09
 * */

export const REGEXP = {
	username: new RegExp('^[a-zA-Z0-9\u4e00-\u9fa5]{2,20}$', 'i'),
	password: new RegExp('^(?![0-9]+$)(?![a-zA-Z]+$)(?!_+$)[a-zA-Z0-9_]{8,20}$', 'i'),
	permName: new RegExp('^[a-zA-Z\u4e00-\u9fa5]{2,20}$', 'i'),
	rulesName: new RegExp('^[a-zA-Z\u4e00-\u9fa5]{2,50}$', 'i'),
	countryName: new RegExp('^[a-zA-Z\u4e00-\u9fa5]{1,20}$'),
	mobilePhone: new RegExp('^((13[0-9])|(14[5-9])|(15[0-3,5-9])|166|(17[0-8])|(18[0-9])|(19[8,9]))\\d{8}$'),
	fixedTelephone: new RegExp('^(0[0-9]{2,3}\-)?([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$'),
	integer: new RegExp('^100$|^(\\d|[1-9]\\d)$'),
	fourDigit: new RegExp('^(0|([1-9]\\d{0,3}))$'),
	twoDigit: new RegExp('^(0|([1-9]\\d{0,1}))$'),
	decimalDigit: new RegExp('^((0(\\.\\d)?)|([1-9]\\d{0,3}(\\.\\d)?))$'),
	carNo: new RegExp('^[\u4e00-\u9fa5]{1}[a-zA-Z]{1}([a-zA-Z_0-9]{5}|[a-zA-Z_0-9]{6})$'),
	positiveNum: new RegExp('^([1-9]\\d*(\.\\d*[1-9])?)|(0\.\\d*[1-9])$'),
	isLeng: new RegExp('^.{2,20}$')
};

export const rules = {
	remark: [
		{
			max: 200,
			msg: '限制在200个字符内'
		}
	],
	limitOneHundred: [
		{
			max: 100,
			msg: '限制在100个字符内'
		}
	]
};
